/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "discountmode")
@XmlRootElement(name="discountmode")
@NamedQueries({
    @NamedQuery(name = "Discountmode.findAll", query = "SELECT d FROM Discountmode d"),
    @NamedQuery(name = "Discountmode.findByDiscountModeID", query = "SELECT d FROM Discountmode d WHERE d.discountModeID = :discountModeID"),
    @NamedQuery(name = "Discountmode.findByDiscountmodename", query = "SELECT d FROM Discountmode d WHERE d.discountmodename = :discountmodename"),
    @NamedQuery(name = "Discountmode.findByIsdeleted", query = "SELECT d FROM Discountmode d WHERE d.isdeleted = :isdeleted")})
public class Discountmode implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "DiscountModeID")
    private Long discountModeID;
    @Column(name = "discountmodename")
    private String discountmodename;
    @Column(name = "isdeleted")
    private Short isdeleted;
    
    public Discountmode() {
    }

    public Discountmode(Long discountModeID) {
        this.discountModeID = discountModeID;
    }

    public Long getDiscountModeID() {
        return discountModeID;
    }

    public void setDiscountModeID(Long discountModeID) {
        this.discountModeID = discountModeID;
    }

    public String getDiscountmodename() {
        return discountmodename;
    }

    public void setDiscountmodename(String discountmodename) {
        this.discountmodename = discountmodename;
    }

    public Short getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Short isdeleted) {
        this.isdeleted = isdeleted;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (discountModeID != null ? discountModeID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Discountmode)) {
            return false;
        }
        Discountmode other = (Discountmode) object;
        if ((this.discountModeID == null && other.discountModeID != null) || (this.discountModeID != null && !this.discountModeID.equals(other.discountModeID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Discountmode[discountModeID=" + discountModeID + "]";
    }

}
